x11: Trap XRandr errors when getting outputs during init and update
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 1 Jun 2023 22:23:51 +0000 (00:23 +0200)
committerSimon McVittie <smcv@debian.org>
Sun, 10 Sep 2023 14:51:04 +0000 (15:51 +0100)
commita0a7d99d780803118b09a49898c422dcc2e791f0
tree5d2062efcd2f0b182266f8bd57d0f9e93a406a54
parent70dae9aaeb8284309f54c1beb3a94689009a3a3d
x11: Trap XRandr errors when getting outputs during init and update

We may try to update the XRR outputs and Crtcs when they're changing in
the server, and so we may get BadRROutput that we're currently not
handling properly.

As per this, use traps and check whether we got errors, and if we did
let's ignore the current output.

It's not required to call init_randr13() again because if we got errors
it's very likely that there's a change coming that will be notified at
next iteration during which we'll repeat the init actions.

Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6047
Origin: 3.24.39, commit:b938e4e6ac75af57ed5cd844c96738f01d57f24c

Gbp-Pq: Name x11-Trap-XRandr-errors-when-getting-outputs-during-init-a.patch
gdk/x11/gdkscreen-x11.c